import ToolActionApi from "@/tool/http/tool-action.js";
import ToolHttp from "./ToolHttp.js";
let api = ToolActionApi.init("common_mechanism");

export default {
	dictTenant: api.dict,
	platformAction: ToolActionApi.init("function_platform"),
	oshi: () => ToolHttp.get("/oshi"),
	toolIp: () => ToolHttp.get("/tool/ip"),
	lovelive: () => ToolHttp.get("/http-send?url=https://api.lovelive.tools/api/SweetNothings/Web/1"),
	online: () => ToolActionApi.run("action-online", "code"),
	taskList: () => ToolHttp.get("/task"),
	task(task, code, data) {
		return ToolHttp.post(`/action/${task}/${code}`, data);
	},
	login: data => ToolHttp.post('/auth/login', data),
	userinfo: data => ToolHttp.get('/auth/userinfo'),
}
